#! /bin/bash

usr_dir=/usr/local/bin

if [ ! -d ${usr_dir} ]; then
    mkdir -p ${usr_dir}
fi

# delete link
for link in $(find $usr_dir -type l); do
  rm -f $link
done

# create link
for cmd in $(find /root/gitee/linux/tools -name "*.sh")
do
  ln -s ${cmd} ${usr_dir}/$(echo $cmd | awk -F/ '{print $NF}')
done

# configure git
cat > ~/.gitconfig << EOF
[user]
email = 906621075@qq.com
name = rthacker' > ~/.gitconfig
EOF
git config credential.helper store

